package com.java.schedul;

import com.java.service.OrdersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author jl
 * Created on 2020/10/19
 */
@Component
public class AutoCloseOrder {
    @Autowired
    private OrdersService ordersService;

//    @Scheduled(cron = "0/5 * * * * ?")
    public void autoCloseOrder() {
        ordersService.autoCloseOrder();
    }
}
